package com.coolingme;

import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author wangyue
 * @date 2022/9/29 9:30
 */
public class App {
    public static void main(String[] args) {
        ILoginService loginService;
        ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("classpath:META-INF/spring/application.xml");

        // 根据名称或者类型获取Bean对象
        loginService = applicationContext.getBean(ILoginService.class);

//        loginService = (ILoginService) applicationContext.getBean("loginService");

        System.out.println(loginService.login("admin", "admin"));
    }
}
